// Learn TypeScript:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html

const {ccclass, property} = cc._decorator;

@ccclass
export default class NewClass extends cc.Component {
    @property(cc.ScrollView)
    t_Scro: cc.ScrollView = null;

    @property(cc.Prefab)
    t_Per: cc.Prefab = null;
   
    // LIFE-CYCLE CALLBACKS:

    // onLoad () {}

    start () {
        for(let a=0;a<20;a++){
            this.t_Scro.content.addChild(this.generatePe());
        }
    }

    generatePe(){
        return cc.instantiate(this.t_Per);
    }
    // update (dt) {}
}
